﻿/*
 * 由SharpDevelop创建。
 * 用户： Joy
 * 日期: 2013/9/23
 * 时间: 22:50
 * 
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */
using System;
using LongestCommonSubsequence.Test;

namespace LongestCommonSubsequence
{


    class Program
    {



        public static void Main(string[] args)
        {
            LCSTest[] tests = new LCSTest[]{ 
                new LCSTest()
                {
                    X = "AXBCDFGH",
                    Y = "AYCBEFHG",
                    ExpectedLCS = new String[] {"ABFG", "ACFG", "ABFH", "ACFH"}
                },
                new LCSTest()
                {
                    X = "ABC",
                    Y = "EDF",
                    ExpectedLCS = new String[0]
                },
                new LCSTest()
                {
                    X = "AAB",
                    Y = "AAC",
                    ExpectedLCS = new String[] {"AA"}
                },
                new LCSTest()
                {
                    X = "ABCBDAB",
                    Y = "BDCABA",
                    ExpectedLCS = new String[] {"BCBA", "BCAB", "BDAB"}
                },
                new LCSTest()
                {
                    X = "AAA",
                    Y = "AB",
                    ExpectedLCS = new String[] {"A", "A", "A"}
                },
                new LCSTest()
                {
                    X = "BAA",
                    Y = "CAA",
                    ExpectedLCS = new String[] {"AA"}
                }
                

            };



            foreach (var test in tests)
            {
                Console.WriteLine(String.Format("X:{0}\tY:{1}", test.X, test.Y));
                Console.WriteLine(test.Run());
            }



            Console.ReadKey();

        }


    }
}